/**
 * @date 2006-3-20 18:35:52
 *
 */
package org.nanhill.moo.dao;

import java.util.List;

import org.nanhill.commons.pattern.search.SearchException;
import org.nanhill.moo.domain.Favor;
import org.nanhill.moo.domain.query.FavorQuery;

/**
 * @author alin [xalinx at gmail dot com]
 * 
 */
public interface FavorDao {

	void deleteById(long id);

	/**
	 * Find part favor.
	 * 
	 * @param query
	 * @return
	 * @throws SearchException
	 */
	List<Favor> findPart(FavorQuery query) throws SearchException;

	/**
	 * Find all favor count.
	 * 
	 * @param query
	 * @return
	 * @throws SearchException
	 */
	long findCount(FavorQuery query) throws SearchException;

	/**
	 * @param favor
	 */
	void save(Favor favor);

	/**
	 * @param favorId
	 * @return
	 */
	Favor findById(Long favorId);

}
